<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="f"  uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h"  uri="http://java.sun.com/jsf/html"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Cadastro de Livro</title>
</head>
<body>
<f:view>
<h2>Cadastro de Livro</h2>
<h:inputHidden value="#{usuarioMB.usuario.id}" />
</br>
<h:outputText style="color: #FF0000" value="#{livroMB.mensagem}" rendered="#{livroMB.comMensagem}"></h:outputText>  
</br>
<h:form id="form">
			<h:panelGrid border="1" columns="2" style="text-align: right">
				<h:outputText value="Titulo: "></h:outputText>
				<h:inputText id="titulo" value="#{livroMB.novo.titulo}"></h:inputText>
				<h:outputText value="Assunto: "></h:outputText>
				<h:inputText id="assunto" value="#{livroMB.novo.assunto}"></h:inputText>
				<h:outputText value="Autor: "></h:outputText>
				<h:inputText id="autor" value="#{livroMB.novo.autor}"></h:inputText>
				<h:outputText value="Editora: "></h:outputText>
				<h:inputText id="editora" value="#{livroMB.novo.editora}"></h:inputText>
				<h:outputText value="ISBN: "></h:outputText>
				<h:inputText id="isbn" value="#{livroMB.novo.isbn}"></h:inputText>
			</h:panelGrid>
			<h:commandButton value="Cadatrar Livro" action="#{livroMB.cadastraLivro}"></h:commandButton>
		</h:form>
</br>
		<h:form>
			<h:commandLink action="minhaBiblioteca.jsp" >
				<h:outputText value="Voltar"></h:outputText>
			</h:commandLink>
		</h:form>
</f:view>
</body>
</html>